]> dgit.raspbian.org Git - gnome-shell.git/log
gnome-shell.git
5 years agosearchController: Get rid of activePage reference in key handling
Marco Trevisan (Treviño) [Wed, 17 Feb 2021 01:31:32 +0000 (02:31 +0100)]
searchController: Get rid of activePage reference in key handling

Even if activePage has been removed as part of commit 27627bd40, we've
still a reference of it in key press handler.

Given that there's no anymore an active page to redirect input to,
remove these references, so that can be handled in the proper view to
implement key-navigation.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1688>

5 years agoworkspace: Ensure that _createBestLayout() always returns a layout
Sebastian Keller [Tue, 16 Feb 2021 12:37:17 +0000 (13:37 +0100)]
workspace: Ensure that _createBestLayout() always returns a layout

When opening a large number of windows, the computed space and scale for
a layout can become negative due to the per-row/per-column spacing. This
is smaller than the initial values of lastSpace and lastSpace, leading
to a null return which then causes all sorts of other issues resulting
in the workspace becoming invisible.

This change ensures that the function always returns a layout, even if
it may look a bit broken and does not conform to the scale/space
requirements which are impossible to fulfill for the given number of
windows. It's better than displaying nothing, since it allows users to
move/close windows and restore this to a more usable state.

Fixes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3730

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1685>

5 years agotheme: Use the same style for dash tooltips as for window captions
Sebastian Keller [Tue, 16 Feb 2021 00:28:00 +0000 (01:28 +0100)]
theme: Use the same style for dash tooltips as for window captions

Both serve a similar function but had different styles. Since these two
can now be seen next to each other, the visual difference is quite
noticeable.

Fixes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3727

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1681>

5 years agogdm: Override any other lower-priority service message on error
Marco Trevisan (Treviño) [Tue, 16 Feb 2021 02:56:09 +0000 (03:56 +0100)]
gdm: Override any other lower-priority service message on error

When we got an error, all the other HINT or INFO messages are not useful
anymore and delaying to show them is just a waste of time and may be
even wrong in scenarios with fast authentication devices.

An example are the fingerprint devices, where the user may touch the
sensor repeatedly while we may still show the "touch the sensor" hint
instead of notifying of possible errors.

So, in case we got an error override all the other errors coming from
the same service with lower priority.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1683>

5 years agogdm: Filter service non-error messages on verification stopped or failed
Marco Trevisan (Treviño) [Tue, 16 Feb 2021 02:45:14 +0000 (03:45 +0100)]
gdm: Filter service non-error messages on verification stopped or failed

Once the verification has been stopped or has failed all the messages
that are not of error type are just not needed or wrong to show.
For example, in the fingerprint case we may still show the hint to swipe
or touch the device, while the fingerprint PAM service has already been
stopped.

So filter them by adding a new function that adds a null message to the
queue, overriding all the messages that have a lower priority.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1683>

5 years agogdm: Add ability to queue a message overriding ones with less priority
Marco Trevisan (Treviño) [Tue, 16 Feb 2021 02:08:38 +0000 (03:08 +0100)]
gdm: Add ability to queue a message overriding ones with less priority

There are cases in which a service may want to override a message with
one coming with higher priority, for example an info or hint message
isn't useful anymore if we've already got an error message.

In the same way when a service has been stopped we don't care anymore
showing its info or hint messages, while it still may be relevant to show
errors.

An example is the fingerprint service that may emit errors quickly while
the hints messages should not be kept around when an error is already
queued or when the service has been stopped.

So, add function that allows to override queued messages based by their
type that follows this policy:
 - Messages coming from different services are always preserved in
   their original order.
 - Messages (from the same service) with a priority equal or higher than
   the last queued one are preserved.
 - Messages matching completely the last queued are dropped in favor of
   this one.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1683>

5 years agogdm: Keep messages in queue until we've not fully processed them
Marco Trevisan (Treviño) [Tue, 16 Feb 2021 01:00:41 +0000 (02:00 +0100)]
gdm: Keep messages in queue until we've not fully processed them

It can be convenient to get the currently showing message in order to
replace or remove it in case it's not needed anymore.

So simplify the message queue handling by only depending on a single
local variable (_messageQueue) and redefining hasPendingMessages
depending on its content.

Now messages are kept in queue till they are not fully processed and the
first message is always the one currently shown.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1683>

5 years agogdm: Compress fingerprint failures events using a timeout
Marco Trevisan (Treviño) [Tue, 16 Feb 2021 03:18:18 +0000 (04:18 +0100)]
gdm: Compress fingerprint failures events using a timeout

When a fingerprint failure event happens we may also soon receive a
conversation-stopped event with an error message (such as in the case
we hit the MAXRETRIES value), but this is going to be ignored in case we
are too quick in consider the first failure a verification-failed event
because that implies disconnecting from all the events and then ignoring
such signals.

To prevent this, add a small timeout before failing the verification so
that if we get a further event we will process it.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1683>

5 years agogdm: Don't try to retry authenticating when the service is unavailable
Marco Trevisan (Treviño) [Mon, 15 Feb 2021 19:59:57 +0000 (20:59 +0100)]
gdm: Don't try to retry authenticating when the service is unavailable

In the case a service is not available (as it can be in the fingereprint
case when a supported reader is available but has not enrolled prints)
we were trying indefinitely to restart it, however this can lead to
troubles since commit 7a2e629b as when the service conversation was
stopped we had no way to figure out this case and we'd end up to
eventually fail the whole authentication.

However, in such cases the PAM services are expected to return a
PAM_AUTHINFO_UNAVAIL and gdm to handle it, emitting service-unavailable
signal.

So connect to ::service-unavailable and keep track of the unavailable
services so that we can avoid retrying with them.
In case such service is not the foreground one, we can just silently
ignore the error as we did before commit 7a2e629b, without bothering
failing the whole verification.

In case we got a valid error message on service-unavailable, we also
show it, this is normally not happening unless GDM isn't redirecting
here other kind of problems (such as MAXTRIES) which are supposed to
stop the authentication stopping any further retry.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3734
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1683>

5 years agoappDisplay: Use icon-size instead of width/height for system actions
Jonas Dreßler [Tue, 16 Feb 2021 13:17:55 +0000 (14:17 +0100)]
appDisplay: Use icon-size instead of width/height for system actions

When creating an icon for the system actions search provider, set the
icon size using StIcons own icon-size property instead of ClutterActors
width and height property. That ensures the scale factor is applied and
the icon will be properly scaled on hiDPI screens.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1686>

5 years agoappDisplay: Use new indentation style
Jonas Dreßler [Tue, 16 Feb 2021 13:26:12 +0000 (14:26 +0100)]
appDisplay: Use new indentation style

Otherwise eslint will complain about the next commit.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1686>

5 years agowindowPreview: Consider chrome overlaps when offscreening for opacity
Sebastian Keller [Tue, 16 Feb 2021 10:45:50 +0000 (11:45 +0100)]
windowPreview: Consider chrome overlaps when offscreening for opacity

The icon and close button might be overlapping the window actor but
were not considered in has_overlaps() which gets used to decide whether
to offscreen the actor for transparency. Since currently the icon is
visible when the preview is dragged and the whole actor is turned
transparent, the opacity will not be applied to everything as a whole
but the child actors individually. This leads to the window becoming
visible behind the icon.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1684>

5 years agoworkspacesView: Don't invalidate allocation before using it for gesture
Sebastian Keller [Tue, 16 Feb 2021 02:50:52 +0000 (03:50 +0100)]
workspacesView: Don't invalidate allocation before using it for gesture

Calling startTouchGesture() on the workspacesViews can change the
visibility of the workspaces if not all of them are already shown, such
as when there are more than 3 workspaces or for 3 workspaces if we are
not on the central one. This invalidates the allocation and the width
used as distance for the gesture would become 0, resulting in drag
gestures immediately jumping to the first or last workspace due to a
division by 0.

Fixes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3721

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1682>

5 years agodnd: Set dnd actor size instead of scaling it when reparenting
Sebastian Keller [Mon, 15 Feb 2021 23:54:37 +0000 (00:54 +0100)]
dnd: Set dnd actor size instead of scaling it when reparenting

Previously the actor could end up using its natural size and then get
scaled down to its allocation before reparenting. This however could
affect the layout of the widget due to the larger size. To ensure the
widget looks the same after reparenting set the size to its original
size.

Fixes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3717

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1680>

5 years agost: Keep weak ref on texture cache bound texture source
Carlos Garnacho [Fri, 12 Feb 2021 22:10:25 +0000 (23:10 +0100)]
st: Keep weak ref on texture cache bound texture source

We don't keep any ref on it, so it might leave us with a dangling
pointer here.

Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3491
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1672>

5 years agogdm: Fail and restart verification on conversation stopped for all services
Marco Trevisan (Treviño) [Mon, 8 Feb 2021 17:57:06 +0000 (18:57 +0100)]
gdm: Fail and restart verification on conversation stopped for all services

Currently when the foreground service conversation stops we increase the
verification failed count and try to start it again, while if a
background service has been stopped we just ignore it.

This is causing a various number of issues, for example in the case of
the fingerprint authentication service, it is normally configured to die
after a timeout, and we end up never restarting it (while the UI still
keeps showing to the user the message about swipe/touch the device).

So, in such case let's just consider it a "soft" verification failure
that doesn't increase the failures count but will cause us to reset the
UI and try to restart the authentication (and so the affected service).

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1652>

5 years agoauthPrompt: Bump the user verifier timeout when wiggling the message
Marco Trevisan (Treviño) [Mon, 8 Feb 2021 18:34:09 +0000 (19:34 +0100)]
authPrompt: Bump the user verifier timeout when wiggling the message

Wiggle may make the error message to be visible for less time so provide
the auth prompt an API to increase the timeout to be used for showing a
message in some cases.

This could be reworked when we'll have a proper asyn wiggle function so
that we could just make the user verifier to "freeze", then await for
the wiggle transition to complete and eventually release the verifier.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1652>

5 years agoauthPrompt: Wiggle error messages coming from the Fingerprint service
Marco Trevisan (Treviño) [Mon, 1 Feb 2021 18:44:00 +0000 (19:44 +0100)]
authPrompt: Wiggle error messages coming from the Fingerprint service

When error messages are coming from the fingerprint service they are actual
failures due to an user input in some device, in so in such case we
can highlight this by using a wiggle effect.

This mimics what has been done in gnome-control-center fingerprint panel
and part of [1].

[1] https://gitlab.gnome.org/Teams/Design/os-mockups/-/issues/56

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1652>

5 years agoauthPrompt: Only wiggle the entry on failures coming from the querying service
Marco Trevisan (Treviño) [Mon, 1 Feb 2021 18:39:03 +0000 (19:39 +0100)]
authPrompt: Only wiggle the entry on failures coming from the querying service

Currently whenever an authentication failure happens we wiggle the
entry, however this may not be related to the service which failed.

For example if the fingerprint authentication failed for whatever reason,
there's no point to wiggle the text input as it's something unrelated to it.

So, only apply the wiggle effect to the entry in case the failure is
coming from the querying service.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1652>

5 years agogdm: Expose the source serviceName for messages and verification failures
Marco Trevisan (Treviño) [Mon, 1 Feb 2021 18:36:49 +0000 (19:36 +0100)]
gdm: Expose the source serviceName for messages and verification failures

By giving to the AuthPrompt information regarding the source service
name (and so the ability to know whether it's a foreground service) can
give it the ability to behave differently.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1652>

5 years agogdm: Count fingerprint authentication failures in fail counter
Marco Trevisan (Treviño) [Mon, 1 Feb 2021 17:40:03 +0000 (18:40 +0100)]
gdm: Count fingerprint authentication failures in fail counter

Fingerprint PAM module can have multiple failures during a runtime
and we rely on the pam module configuration for the maximum allowed
retries.

However, while that setting should be always followed, we should never
ignore the login-screen's allowed-failures setting that can provide
a lower value.

So, once we have a fingerprint failure let's count it to increase our
internal fail counter, and when we've reached the limit we can emit a
verification-failed signal to our clients.

As per this we need also to ignore any further 'info' messages that we
could receive from the fingerprint service, as it may be configured to
handle more retries than us and they might arrive before we have
cancelled the verification session.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1652>

5 years agogdm: Increase the verification failed counter once we've a failure
Marco Trevisan (Treviño) [Mon, 8 Feb 2021 17:43:16 +0000 (18:43 +0100)]
gdm: Increase the verification failed counter once we've a failure

Decouple the verification failure count increase from
_verificationFailed as there are some cases in which we may want to
increase it without emitting a verification-failed signal.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1652>

5 years agogdm: Always show fingerprint error messages
Marco Trevisan (Treviño) [Tue, 24 Nov 2020 18:19:22 +0000 (19:19 +0100)]
gdm: Always show fingerprint error messages

When the login/lock screen is shown the error messages for background
services are always ignored.

However, in case the service is the fingerprint authentication method
we still want to be able to show error messages to inform the user
about what failed, and eventually that the max retries (that may be
different from the login screen configuration) has been reached.

This handles partially the design issue [1] related to the login/lock
screen fingerprint authentication.

Eventually we want to use pam extensions to use clearer and parse-able
messages, however in the case of the fingerprint service we can be sure
that the fprint PAM module will only send errors on auth failures.

[1] https://gitlab.gnome.org/Teams/Design/os-mockups/-/issues/56

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1652>

5 years agoShellUserVerifier: Add method to check if the service name is fingerprint
Marco Trevisan (Treviño) [Mon, 8 Feb 2021 16:07:45 +0000 (17:07 +0100)]
ShellUserVerifier: Add method to check if the service name is fingerprint

We have multiple places where we check if we're handling a fingerprint
event, so let's add a common public function so that it can be used also
by the authPrompt.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1652>

5 years agoblur-effect: Don't use stage view when drawing off-stage
Jonas Dreßler [Sat, 13 Feb 2021 15:07:22 +0000 (16:07 +0100)]
blur-effect: Don't use stage view when drawing off-stage

When we're painting off-stage, for example because we're screencasting
or taking a screenshot, there won't be a stage-view associated with the
paint context. The BlurEffect previously didn't handle that case and
would crash.

Fix that and handle that case by assuming the scale is 1 and not
offsetting the rectangle we blit from the draw framebuffer.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1673>

5 years agoUpdated Spanish translation
Daniel Mustieles [Mon, 15 Feb 2021 09:48:39 +0000 (10:48 +0100)]
Updated Spanish translation

5 years agoUpdate Serbian translation
Марко Костић [Mon, 15 Feb 2021 08:16:57 +0000 (08:16 +0000)]
Update Serbian translation

5 years agoshell: Drop shell_global_sync_pointer()
Carlos Garnacho [Fri, 18 Dec 2020 14:30:04 +0000 (15:30 +0100)]
shell: Drop shell_global_sync_pointer()

This is now unused, and shouldn't be used anymore.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1556>

5 years agomessageTray: Drop hack to keep track of X11
Carlos Garnacho [Fri, 18 Dec 2020 14:11:34 +0000 (15:11 +0100)]
messageTray: Drop hack to keep track of X11

This is here to cater for lost events while the pointer wanders
into untracked shell UI (thus not part of the input region under
X11). Let mutter handle this situation instead.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1556>

5 years agowindowManager: Drop sync_pointer() after relayouts
Carlos Garnacho [Fri, 18 Dec 2020 12:27:39 +0000 (13:27 +0100)]
windowManager: Drop sync_pointer() after relayouts

We should trust the Clutter machinery here, as it has code to trigger
focus changes triggered by relayouts.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1556>

5 years agomessageList: Drop sync_pointer() after relayouts
Carlos Garnacho [Fri, 18 Dec 2020 12:25:47 +0000 (13:25 +0100)]
messageList: Drop sync_pointer() after relayouts

We should trust the Clutter machinery here, as it has code to trigger
focus changes triggered by relayouts.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1556>

5 years agooverview: Avoid sync_pointer after pop_modal()
Carlos Garnacho [Fri, 18 Dec 2020 12:24:55 +0000 (13:24 +0100)]
overview: Avoid sync_pointer after pop_modal()

This is only necessary for the X11 backend (as grabs triggered by other
clients leave GNOME Shell oblivious of the actual pointer position), but
is now handled inside Mutter.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1556>

5 years agograbHelper: Avoid sync_pointer after pop_modal()
Carlos Garnacho [Fri, 18 Dec 2020 12:22:50 +0000 (13:22 +0100)]
grabHelper: Avoid sync_pointer after pop_modal()

This is only necessary for the X11 backend (as grabs triggered by other
clients leave GNOME Shell oblivious of the actual pointer position), but
is now handled inside Mutter.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1556>

5 years agodnd: Avoid sync_pointer after pop_modal()
Carlos Garnacho [Fri, 18 Dec 2020 12:20:18 +0000 (13:20 +0100)]
dnd: Avoid sync_pointer after pop_modal()

This is only necessary for the X11 backend (as grabs triggered by other
clients leave GNOME Shell oblivious of the actual pointer position), but
is now handled inside Mutter.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1556>

5 years agoUpdate Punjabi translation
A S Alam [Sun, 14 Feb 2021 00:50:19 +0000 (00:50 +0000)]
Update Punjabi translation

5 years agoUpdate Hungarian translation
Balázs Meskó [Sat, 13 Feb 2021 23:32:09 +0000 (23:32 +0000)]
Update Hungarian translation

5 years agost/scroll-view-fade: Fix vertical top fading
Sebastian Keller [Sat, 13 Feb 2021 20:13:57 +0000 (21:13 +0100)]
st/scroll-view-fade: Fix vertical top fading

The fade for the vertical top edge was calculating the fade ratio for a
larger height (up to where the bottom fade starts) than it was
displaying.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1674>

5 years agoosk-layouts: Add additional keys to Thai layout
Panawat Wong-kleaw [Tue, 1 Sep 2020 08:05:43 +0000 (08:05 +0000)]
osk-layouts: Add additional keys to Thai layout

Add Anghankhu (๚), Fongman (๏), Khomut (๛), and Yamakkan ( ๎) keys.

These keys do not exist in most, if not all, Thai physical keyboards,
but may be used by those who study ancient Thai texts. However,
they are an optional part of the TIS-820-2538 spec[0].

[0] https://www.nectec.or.th/it-standards/std820/std820.html

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3106

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1427>

5 years agoosk-layouts: Add a shift level to Thai layout
Panawat Wong-kleaw [Tue, 1 Sep 2020 07:32:01 +0000 (07:32 +0000)]
osk-layouts: Add a shift level to Thai layout

It is currently missing entirely from the generated layout.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3106

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1427>

5 years agowindowManager: Do not set Wacom LED state through g-s-d
Carlos Garnacho [Fri, 6 Mar 2020 14:34:00 +0000 (15:34 +0100)]
windowManager: Do not set Wacom LED state through g-s-d

This piece of machinery is going away, in favor of the own kernel's
support.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1075>

5 years agolookingGlass: Let history trim input
Lucas Werkmeister [Thu, 11 Feb 2021 18:44:03 +0000 (19:44 +0100)]
lookingGlass: Let history trim input

Checking whether the item is empty is now the history’s job, per the
previous two commits. The history also trims the input for us.

The effect of this is that we call _history.addItem(), and thereby move
to the end of the history, even if the input is empty (or consists only
of whitespace); clearing the input field and pressing Enter becomes a
quick way to jump back to the end of the history. (The current history
item is not overwritten if the input is empty.)

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1653>

5 years agorunDialog: Let history trim input
Lucas Werkmeister [Thu, 11 Feb 2021 18:35:07 +0000 (19:35 +0100)]
runDialog: Let history trim input

Checking whether the item is empty is now the history’s job, per the
previous commit. The history also returns the trimmed input for us, so
we can avoid doing that work twice.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1653>

5 years agohistory: Trim input and ignore if empty
Lucas Werkmeister [Mon, 8 Feb 2021 21:20:42 +0000 (22:20 +0100)]
history: Trim input and ignore if empty

This ports the runDialog changes of [1] to the underlying history
component, where they can benefit looking glass as well: the history is
now responsible for trimming the input and deciding that it shouldn’t be
stored if empty. (Note that _setPrevItem and _setNextItem already
skipped updating the history if the entry was empty.)

Since both users, runDialog and lookingGlass, also need the trimmed
input for other reasons – runDialog to avoid issues when interpreting
the command as a file path (if it can’t be executed as a command),
lookingGlass to decide whether a command should be run at all – have
addItem return the trimmed input. (runDialog and lookingGlass are not
yet changed to take advantage of this – that will be done in separate
commits.)

[1]: https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1442

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1653>

5 years agohistory: Use strict equality checks
Lucas Werkmeister [Thu, 11 Feb 2021 22:28:55 +0000 (23:28 +0100)]
history: Use strict equality checks

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1653>

5 years agoHC: Set legible app icons for window thumbnails
Jakub Steiner [Mon, 8 Feb 2021 15:28:20 +0000 (16:28 +0100)]
HC: Set legible app icons for window thumbnails

Fixes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3692

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1657>

5 years agogdm: Restart only the service that failed at verification-failure
Marco Trevisan (Treviño) [Tue, 2 Feb 2021 16:57:45 +0000 (17:57 +0100)]
gdm: Restart only the service that failed at verification-failure

When verification failed using a specific authentication service we're
currently restarting the whole user authentication system, which leads
to lots of unneeded operations (reinitializing a new user verifier proxy,
restarting all the gdm workers with the relative PAM modules and so on).
And this makes also debugging of login problems more complicated, given
we're cluttering the journal with repeated data.

However, at reauthentication failure GDM has already set up for us an
user verifier that we can use reuse to start only the service that had a
failure. So when possible, just start a new service instead of rebooting
the whole authorization process.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1622>

5 years agogdm: Pass source serviceName to verification failures
Marco Trevisan (Treviño) [Mon, 1 Feb 2021 18:36:49 +0000 (19:36 +0100)]
gdm: Pass source serviceName to verification failures

Depending on the service name we got the failure from we could react
differently, so let's pass the value to the verification failure
handler.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1622>

5 years agogdm: Ensure we cancel all the previously running services on auth retry
Marco Trevisan (Treviño) [Tue, 2 Feb 2021 16:29:29 +0000 (17:29 +0100)]
gdm: Ensure we cancel all the previously running services on auth retry

When retrying the authentication we should make sure that all the
previously initiated services are stopped in order to begin a new
authentication session with all the configured services.

Unfortunately at the current state we only dispose the currently used
user verifier, but we don't make it to stop all the relative gdm workers
and then they'll stay around potentially blocking any further usage of
them (as it happens with the fingerprint one, that has unique access to
the device).

So, cancel the currently running authentication before starting a new
one if we're explicitly retrying.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1622>

5 years agogdm: Include the failed service name when in reporting errors
Marco Trevisan (Treviño) [Tue, 2 Feb 2021 15:40:24 +0000 (16:40 +0100)]
gdm: Include the failed service name when in reporting errors

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1622>

5 years agogdm: Do not fail the whole authentication if a background service failed
Marco Trevisan (Treviño) [Tue, 2 Feb 2021 15:30:11 +0000 (16:30 +0100)]
gdm: Do not fail the whole authentication if a background service failed

In case a background service such as the fingerprint authentication
fails to start we'd just mark the whole authentication process as
failed.

Currently this may happen by just putting a wrong password when an user
has some fingerprints enrolled, the fingerprint gdm authentication
worker may take some time to restart leading to a failure and this is
currently also making the password authentication to fail:

    JS ERROR: Failed to start gdm-fingerprint for u: Gio.DBusError:
        GDBus.Error:org.freedesktop.DBus.Error.Spawn.Failed:
            Could not create authentication helper process
        _promisify/proto[asyncFunc]/</<@resource:///org/gnome/gjs/modules/core/overrides/Gio.js:435:45
        ### Promise created here: ###
        _startService@resource:///org/gnome/shell/gdm/util.js:470:42
        _beginVerification@resource:///org/gnome/shell/gdm/util.js:495:18
        _getUserVerifier@resource:///org/gnome/shell/gdm/util.js:405:14
        async*_openReauthenticationChannel@resource:///org/gnome/shell/gdm/util.js:378:22
        async*begin@resource:///org/gnome/shell/gdm/util.js:194:18
        _retry@resource:///org/gnome/shell/gdm/util.js:561:14
        _verificationFailed/signalId<@resource:///org/gnome/shell/gdm/util.js:584:30
        _emit@resource:///org/gnome/gjs/modules/core/_signals.js:133:47
        finishMessageQueue@resource:///org/gnome/shell/gdm/util.js:268:14
        _queueMessageTimeout@resource:///org/gnome/shell/gdm/util.js:273:18
        _queueMessageTimeout/this._messageQueueTimeoutId<@resource:///org/gnome/shell/gdm/util.js:288:65

Given that background services are ignored even for queries or any kind
of message, we should not fail the authentication request unless the
default service fails.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1622>

5 years agogdm: Disconnect user verifier signals on destruction and verification failed
Marco Trevisan (Treviño) [Tue, 2 Feb 2021 14:08:10 +0000 (15:08 +0100)]
gdm: Disconnect user verifier signals on destruction and verification failed

When a verification session has failed we may want to wait for the user
to have completed all the waiting queries and to have read all the
incoming messages, however during such time an user verifier should
not be allowed to queue further messages to the UI, as we're about to
completely stop the identification or start a new one.

Unfortunately this is not true because we're still connected to the
identifier signals, and so we may still show messages.
This is particularly true when using the fingerprint PAM module as it
may restart the authentication while we're in the process of stopping
it.

So, keep track of all the signals we've connected to, and disconnect on
verification failed and during cancel/clear operations.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1622>

5 years agogdm: Don't try answering query if the user verifier has been deleted
Marco Trevisan (Treviño) [Mon, 1 Feb 2021 15:42:21 +0000 (16:42 +0100)]
gdm: Don't try answering query if the user verifier has been deleted

Answering a query may be delayed to the moment in which we've not any
more messages in the queue, however this case can also happen just after
we've cleared the UserVerifier and in such case we'd have nothing to
answer, but we currently throw an error:

    JS ERROR: Exception in callback for signal: no-more-messages:
      TypeError: this._userVerifier is null
    answerQuery/signalId<@resource:///org/gnome/shell/gdm/util.js:249:17
    _emit@resource:///org/gnome/gjs/modules/core/_signals.js:133:47
    finishMessageQueue@resource:///org/gnome/shell/gdm/util.js:266:14
    _clearMessageQueue@resource:///org/gnome/shell/gdm/util.js:301:14
    clear@resource:///org/gnome/shell/gdm/util.js:223:14
    cancel@resource:///org/gnome/shell/gdm/util.js:205:18
    reset@resource:///org/gnome/shell/gdm/authPrompt.js:482:32
    cancel@resource:///org/gnome/shell/gdm/authPrompt.js:569:14
    vfunc_key_press_event@resource:///org/gnome/shell/gdm/authPrompt.js:128

So handle this case more gracefully keeping track of the current
cancellable and checking whether it is still valid before trying to answer
a query or do a delayed action.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1622>

5 years agogdm: Limit verification cancellations to be conform to allowed-failures
Marco Trevisan (Treviño) [Mon, 1 Feb 2021 12:10:45 +0000 (13:10 +0100)]
gdm: Limit verification cancellations to be conform to allowed-failures

As per previous commit the user can cancel an ongoing authentication via
Escape key and that will always send the user back to the clock view in
lockscreen or user-selection view in login prompt.

However, we can be a little more permissive and don't switch view to be
able to restart the authentication without further action.

To avoid this to be abused though, we consider the user verification
cancellation via escape key to be a "soft-failure", so once the
configured "allowed-failures" gsettings value has been reached, we'd
just act as before, ignoring any further request (until we don't get
back to the user auth view).

In this way we still make brute-force attacks harder to do, while still
giving the well-behaving user some ability to fix mistakes.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1622>

5 years agoauthPrompt: Handle Escape key to cancel ongoing verification
Marco Trevisan (Treviño) [Mon, 1 Feb 2021 11:52:01 +0000 (12:52 +0100)]
authPrompt: Handle Escape key to cancel ongoing verification

Escape key is supposed to cancel a verification, however if the user
already hit Enter to begin the authentication the Escape key won't work
until the verification completed.

This may be quite inconvenient when an user did a typo while writing and
wants to cancel the already started auth.

So, while authenticating (or in general while the entry is unsensitive)
give the key focus to the authpromt itself so that we can still get the
input events and cancel an user action.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1622>

5 years agoauthPrompt: Don't begin a new authentication session on lockscreen cancel event
Marco Trevisan (Treviño) [Sat, 30 Jan 2021 03:18:32 +0000 (04:18 +0100)]
authPrompt: Don't begin a new authentication session on lockscreen cancel event

When a cancel event in the user lockscreen happens we first emit a reset
signal and immediately a cancelled one.

This lead to start a new gdm worker for each enabled authentication
method and then immediately to stop it.
As per the previous commit, we don't have anymore dangling gdm workers
around, but still we should not even start a new one in such case.

So, when the user explicitly cancelled the authentication session, first
emit a cancelled event and only emit a reset event with a begin request
if we are outside the lockscreen.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1622>

5 years agogdm: Cancel user verification on UserVerifier destruction
Marco Trevisan (Treviño) [Sat, 30 Jan 2021 00:53:59 +0000 (01:53 +0100)]
gdm: Cancel user verification on UserVerifier destruction

When we cancel an user authentication via Escape key or cancel button on
AuthPrompt we reset the view and we emit a 'cancelled' signal that leads
to destroying the auth prompt and the user verifier.

However, the verifier may still have an operation in progress and its
completion may take some time (as in the case of gdm-fingerprint), but
we just leave the gdm worker running until its pam module completes
(potentially never) clearing and disposing its handle.

So, instead of just clearing the verify, actually cancel and clear it.
In case the user verifier is set, clearing the relevant data will happen
anyway as part of the cancel() call.

Ideally this would have been handled by gdm itself, but unfortunately we
can't fix it there because the verifier itself is a class generated by
gdbus-codegen, so we can't handle this automatically on disposal nor we
can automatically monitor when the caller proxy is stopped on our side.

Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3654
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1622>

5 years agowindowPreview: Tie icon scale to overview state
Florian Müllner [Thu, 4 Feb 2021 20:14:42 +0000 (21:14 +0100)]
windowPreview: Tie icon scale to overview state

Scaling the icons all the way from/to 0 is a relatively big transition,
which is fairly distracting when playing simultaneously for multiple
previews after reaching the WINDOW_PICKER state.

Instead, tie the scale to the overview state itself, so that the animations
runs in parallel.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1654>

5 years agoUpdate Galician translation
Fran Dieguez [Fri, 12 Feb 2021 19:10:40 +0000 (19:10 +0000)]
Update Galician translation

5 years agoUpdate Belarusian translation
Аляксей [Fri, 12 Feb 2021 16:18:19 +0000 (16:18 +0000)]
Update Belarusian translation

5 years agoUpdate Brazilian Portuguese translation
Bruno Lopes da Silva [Fri, 12 Feb 2021 15:12:52 +0000 (15:12 +0000)]
Update Brazilian Portuguese translation

5 years agoUpdate Indonesian translation
Kukuh Syafaat [Fri, 12 Feb 2021 12:01:04 +0000 (12:01 +0000)]
Update Indonesian translation

5 years agoUpdate Romanian translation
Daniel Șerbănescu [Fri, 12 Feb 2021 10:20:30 +0000 (10:20 +0000)]
Update Romanian translation

5 years agooverviewControls: Limit Dash height to 15% of the overview's
Georges Basile Stavracas Neto [Fri, 22 Jan 2021 13:36:37 +0000 (10:36 -0300)]
overviewControls: Limit Dash height to 15% of the overview's

Back when the Dash was vertical, the size of each item was calculated
solely based on the available height. After making the Dash horizontal,
this was swapped by the available width. However, when the height of the
Dash decreases, the current code results in never scaling them up ever
again.

Fix that by making ControlsManagerLayout explicitly pass the maximum Dash
sizes. Remove the 'notify::width' handler that served the same purpose.

Fixes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3651

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1638>

5 years agosearchController: General cleanup
Georges Basile Stavracas Neto [Thu, 11 Feb 2021 18:45:03 +0000 (15:45 -0300)]
searchController: General cleanup

Fix style issues, such as indentation and == → ===. Simplify
getTermsForSearchString() by removing one variable.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1667>

5 years agoRename ViewSelector to SearchController
Georges Basile Stavracas Neto [Fri, 15 Jan 2021 12:59:58 +0000 (09:59 -0300)]
Rename ViewSelector to SearchController

Rename ViewSelector to SearchController, since ViewSelector now effectively
only handles search. Rename the file correspondingly as well.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1667>

5 years agoviewSelector: Cleanup pages
Georges Basile Stavracas Neto [Fri, 15 Jan 2021 12:50:39 +0000 (09:50 -0300)]
viewSelector: Cleanup pages

Remove the dummy applications page that was introduced as a temporary
step. Replace the 'page-changed' and 'page-empty' signals with a 'search-active'
boolean property.

Remove ViewSelector.ViewsPage since it's now unused, and all the page handling
mechanism. At last, since we don't use any ShellStack features anymore, simply
make it a St.Widget with a ClutterBinLayout as the layout manager.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1667>

5 years agoUpdate Ukrainian translation
Yuri Chornoivan [Thu, 11 Feb 2021 20:40:03 +0000 (20:40 +0000)]
Update Ukrainian translation

5 years agoUpdate Swedish translation
Anders Jonsson [Thu, 11 Feb 2021 19:46:04 +0000 (19:46 +0000)]
Update Swedish translation

5 years agoscreenshot: Remove shooter from sender in finally block
Jonas Dreßler [Tue, 9 Feb 2021 16:09:05 +0000 (17:09 +0100)]
screenshot: Remove shooter from sender in finally block

We do this in both the try{} and the catch{} block, so we might as well
put it into a finally{} block.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1658>

5 years agoscreenshot: Fix slow audiovisual feedback on when taking screenshot
Jonas Dreßler [Tue, 9 Feb 2021 11:51:33 +0000 (12:51 +0100)]
screenshot: Fix slow audiovisual feedback on when taking screenshot

Add a "screenshot-taken" signal from the screenshot service's internal C
implementation, and use that to trigger the camera flash visual effect
and the click sound, allowing them to run in parallel with the PNG
compression instead of waiting until the file is complete to start.

This significantly improves perceived latency on high res setups such as
4K, 5K, or dual 4K screens.

Fixes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/512

Co-authored-by: Brion Vibber <bvibber@wikimedia.org>
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1658>

5 years agoscreenshot: Replace template strings with .format()
Jonas Dreßler [Thu, 11 Feb 2021 17:30:10 +0000 (18:30 +0100)]
screenshot: Replace template strings with .format()

CI will complain when we add screenshot.js to the POTFILES in the next
commit because gettext doesn't like template strings, so make CI happy
and switch to .format() instead.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1658>

5 years agoFix for screenshots when pictures path is unavailable
Brion Vibber [Wed, 18 Dec 2019 22:34:45 +0000 (14:34 -0800)]
Fix for screenshots when pictures path is unavailable

On my local jhbuild setup some local stuff is not set up and
there's no pictures folder. This fixes a regression where it
blew up instead of saving to the home dir in this situation.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1658>

5 years agoworkspace: Disable overlay for inactive workspaces too
Georges Basile Stavracas Neto [Fri, 5 Feb 2021 16:39:13 +0000 (13:39 -0300)]
workspace: Disable overlay for inactive workspaces too

In addition to disabling the overlay when the state is not 1,
disable it also when not in the active workspace.

Make the Workspace class track the workspace's active state,
and resync the overlays when it changes.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1645>

5 years agoworkspace: Always leave overview when in app grid state
Georges Basile Stavracas Neto [Fri, 5 Feb 2021 16:22:18 +0000 (13:22 -0300)]
workspace: Always leave overview when in app grid state

The behavior of workspaces is different depending on whether
the overview is in window picker state, or app grid state.

When in window picker state, clicking on adjacent workspaces
should only activate them, without hiding the overview; and
clicking on the active workspace hides the overview. When in
app grid state, clicking on a workspace must always hide the
overview.

Pass the overview adjustment to Workspace, and leave overview
if the overview state is bigger than WINDOW_PICKER.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1645>

5 years agoextensions-app: Use development profile for nightly build
Florian Müllner [Fri, 22 Jan 2021 21:16:20 +0000 (22:16 +0100)]
extensions-app: Use development profile for nightly build

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3612

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1661>

5 years agoextensions-app: Stop prefixing .desktop file
Florian Müllner [Fri, 22 Jan 2021 21:40:12 +0000 (22:40 +0100)]
extensions-app: Stop prefixing .desktop file

Adding prefixes like (Nightly) is discouraged nowadays in favor of
the radioactive icon overlays.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3612

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1661>

5 years agoextensions-app: Include commit hash in nightly version
Florian Müllner [Fri, 22 Jan 2021 21:07:42 +0000 (22:07 +0100)]
extensions-app: Include commit hash in nightly version

It's useful information for development snapshots, so include
it when building from a git checkout.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3612

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1661>

5 years agoextensions-app: Support building a separate Devel app
Florian Müllner [Fri, 22 Jan 2021 18:29:07 +0000 (19:29 +0100)]
extensions-app: Support building a separate Devel app

Follow the pattern used by most GNOME applications and add a profile
build option that allows building a Devel app instead of the regular
release.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3612

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1661>

5 years agoextensions-app: Pick up app ID from package
Florian Müllner [Fri, 22 Jan 2021 21:08:41 +0000 (22:08 +0100)]
extensions-app: Pick up app ID from package

This will allow us to build different applications from the
same sources (namely "Extensions" and "Extensions Nightly").

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3612

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1661>

5 years agoworkspacesView: Interpolate against relative workspace boxes
Georges Basile Stavracas Neto [Tue, 2 Feb 2021 19:34:59 +0000 (16:34 -0300)]
workspacesView: Interpolate against relative workspace boxes

The overview transition consists of getting the initial and final
states of the overview adjustment, derivating various other internal
states from them (such as the fit mode, opacities, translations, etc),
and finally interpolating the allocation boxes.

When interpolating between the fit mode, WorkspacesView uses the current
allocation box to derivate the SINGLE and ALL fit mode boxes. However,
that creates a curved path during overview transitions. What we really
want to do here is calculate the fit mode box relative to the corresponding
overview state. For example:

 +----------------+----------+------------------------+
 | Overview State | Fit Mode | Workspaces geometry    |
 +----------------+----------+------------------------+
 | HIDDEN         | SINGLE   | Cover entire screen    |
 | WINDOW PICKER  | SINGLE   | Between minimap & Dash |
 | APP GRID       | ALL      | 15% screen height      |
 +----------------+----------+------------------------+

Using the table above as the reference, when the overview transitions
between WINDOW PICKER and APP GRID, we must interpolate between
(SINGLE fit mode @ between minimap & Dash) and (ALL fit mode @ 15% screen
height). That way, we always interpolate the final boxes, which corrects
the odd path that workspaces follow during this transition.

Make the WorkspacesView of the primary monitor use these cached boxes
when the overview is in the middle of a transition, and the fit modes of
the initial and final state differ, to calculate the workspaces positions.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1624>

5 years agooverviewControls: Cache workspaces boxes
Georges Basile Stavracas Neto [Wed, 10 Feb 2021 21:09:04 +0000 (18:09 -0300)]
overviewControls: Cache workspaces boxes

Next commit will need to access the allocated workspaces boxes, so
cache them at allocation time.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1624>

5 years agotheme: Adjust app grid visuals
Georges Basile Stavracas Neto [Fri, 15 Jan 2021 18:23:50 +0000 (15:23 -0300)]
theme: Adjust app grid visuals

So that at least in 1366x768 it doesn't switch to 32px icons.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1624>

5 years agoworkspacesView: Use calculated workspace state for progress
Georges Basile Stavracas Neto [Fri, 15 Jan 2021 18:58:33 +0000 (15:58 -0300)]
workspacesView: Use calculated workspace state for progress

It works just like before, except that this has the nice side effect
of not changing the workspace mode when leaving the overview from
the app grid state.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1624>

5 years agooverviewControls: Make AppDisplay rise from the bottom
Georges Basile Stavracas Neto [Wed, 20 Jan 2021 22:25:13 +0000 (19:25 -0300)]
overviewControls: Make AppDisplay rise from the bottom

It makes more sense in a spatial overview that the app grid
comes and goes to somewhere in the screen, instead of fading
in and out into the void.

Make the app grid rise from the bottom of the screen.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1624>

5 years agoworkspacesView/workspacesDisplay: Remove parent opacity hack
Georges Basile Stavracas Neto [Fri, 15 Jan 2021 11:00:50 +0000 (08:00 -0300)]
workspacesView/workspacesDisplay: Remove parent opacity hack

Now, we set WorkspacesDisplay's opacity directly, so there's no
need to have this parent → child glue code anymore. Remove it.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1624>

5 years agooverviewControls: Incorporate ActivitiesContainer
Georges Basile Stavracas Neto [Thu, 14 Jan 2021 23:23:15 +0000 (20:23 -0300)]
overviewControls: Incorporate ActivitiesContainer

Move AppDisplay, WorkspacesDisplay, and ThumbnailsBox from ViewSelector to
ControlsManager. This allows to always allocate the correct size for AppDisplay,
and will enable for a plethora of further improvements. The end goal is to
completely remove ViewSelector, and let ControlsManager handle the layout of
everything that's visible in the overview.

For now, replace the apps page with a dummy actor in ViewSelector.

Adjust various callers around the codebase to not access the ViewSelector
directly from the overview anymore.

Bind the opacity of the primary workspace to WorkspaceDisplay's opacity. This
allows removing the parent opacity hack in place, which will be done by the
next commit.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1624>

5 years agooverviewControls: Use specialized class for Overview adjustment
Georges Basile Stavracas Neto [Fri, 15 Jan 2021 18:28:23 +0000 (15:28 -0300)]
overviewControls: Use specialized class for Overview adjustment

It'll be useful for the next commits to have a handy 'getState' method
that calculates the progress of any particular transition.

Move the St.Adjustment to a specialized subclass.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1624>

5 years agoviewSelector: Remove pinch gestures
Georges Basile Stavracas Neto [Tue, 5 Jan 2021 13:38:33 +0000 (10:38 -0300)]
viewSelector: Remove pinch gestures

It'll be replaced by a 3 finger gesture that sticks to fingers
and progressively transitions between states.

Remove both pinch and touchpad pinch gestures from ViewSelector.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1624>

5 years agoviewSelector: Drop edge drag gesture
Georges Basile Stavracas Neto [Tue, 5 Jan 2021 13:33:59 +0000 (10:33 -0300)]
viewSelector: Drop edge drag gesture

It doesn't use any ViewSelector's API anymore, and its functionality will be taken
over by the 3 finger gesture.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1624>

5 years agoviewSelector: Move 'toggle-applications-view' to ControlsManager
Georges Basile Stavracas Neto [Sat, 2 Jan 2021 20:41:54 +0000 (17:41 -0300)]
viewSelector: Move 'toggle-applications-view' to ControlsManager

Move the shortcut handling into ControlsManager, and reimplement
the callback in such a way that it behaves correctly with the
current overview machinery.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1624>

5 years agoviewSelector: Remove showApps()
Georges Basile Stavracas Neto [Sat, 2 Jan 2021 20:28:44 +0000 (17:28 -0300)]
viewSelector: Remove showApps()

Now that Overview is able to ease into any state, be it window
picker or app grid, we can move this ViewSelector method to
Overview itself, which is its rightful place to live.

Remove ViewSelector.showApps(), and make all callers call
Main.overview.show(ControlsState.APP_GRID). Also make sure the
show apps button is correctly toggled.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1624>

5 years agooverivew: Propagate target state when animating to overview
Georges Basile Stavracas Neto [Sat, 2 Jan 2021 20:19:37 +0000 (17:19 -0300)]
overivew: Propagate target state when animating to overview

Next commits will requires ControlsManager to animate to different
states, depending on how Overview is called. Add a new 'state'
parameter to ControlsManager's, and OverviewActor's animateToOverview,
and Overview.show().

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1624>

5 years agoviewSelector: Move 'toggle-overview' shortcut to overview
Georges Basile Stavracas Neto [Sat, 2 Jan 2021 20:10:36 +0000 (17:10 -0300)]
viewSelector: Move 'toggle-overview' shortcut to overview

It is handled there already, there's no reason for it to continue
to be in ViewSelector.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1624>

5 years agoworkspace, workspacesView: Cleanup animation methods
Georges Basile Stavracas Neto [Sat, 2 Jan 2021 19:17:17 +0000 (16:17 -0300)]
workspace, workspacesView: Cleanup animation methods

Remove Workspace.zoomTo/FromOverview(), they're unused now. Rename
everything up to ControlsManager to prepareToEnter/LeaveOverview(),
since these classes don't run the animation anymore.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1624>

5 years agoworkspacesView: Derive workspace mode from overview state
Georges Basile Stavracas Neto [Sat, 2 Jan 2021 19:06:34 +0000 (16:06 -0300)]
workspacesView: Derive workspace mode from overview state

WorkspacesView uses the floating layout when the overview is in window
picker mode, and the session layout when the overview is in app grid
mode. Up until now, the fit mode adjustment was used to derive the
workspace mode, but it is incomplete as it doesn't have the full range
of workspace states.

Make ViewSelector cascade the overview adjustment to WorkspacesDisplay,
and use the overview adjustment itself to derive the workspace mode.

Extra workspaces don't have to account for the fit mode, and thus are
basically a clamp(state, 0, 1) of the overview state. However, don't
call animateTo/FromOverview() anymore, since they ease the workspace
mode adjustment.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1624>

5 years agoworkspacesView: Add primary view to workspaces display
Florian Müllner [Fri, 26 Jun 2020 16:38:28 +0000 (18:38 +0200)]
workspacesView: Add primary view to workspaces display

Boy, does this commit feel good.

While the workspaces view on the primary monitor *appears* as part of
the overall overview hierarchy, this hasn't actually been the case
until now. We synchronized its size and (stage) position to match
the workspaces display, but actually kept in a separate layer for
the transitions to and from the overview.

But now that the new layout manager slides out completely during the
overview transitions, the workspaces display starts out covering the
entire work area, which is exactly what we need for the transition.

So finally stop faking it, and actually make the primary workspaces
view a child of the workspaces display.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1624>

5 years agooverview: Don't fade OverviewActor
Georges Basile Stavracas Neto [Fri, 1 Jan 2021 17:18:18 +0000 (14:18 -0300)]
overview: Don't fade OverviewActor

Now that the workspace display is properly allocated for each frame,
we don't want to fade the entire overview anymore.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1624>

5 years agooverviewControls: Ease main adjustment when animating to/from overview
Georges Basile Stavracas Neto [Fri, 1 Jan 2021 17:00:30 +0000 (14:00 -0300)]
overviewControls: Ease main adjustment when animating to/from overview

Instead of delegating it to ViewSelector, make the transition to and from
overview ease the main state adjustment.

This commit temporarily breaks these animations, but on the other hand
introduces an important feature: ViewSelector is always allocated to the
actual size. This will finally allow for adding WorkspacesView as a child
of WorkspacesDisplay, and finally remove the actual geometry hack, which
is what next commit is about.

This commit also effectively reverts b64103efc.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1624>

5 years agooverview: Reorganize animateTo/FromOverview()
Georges Basile Stavracas Neto [Fri, 1 Jan 2021 16:39:07 +0000 (13:39 -0300)]
overview: Reorganize animateTo/FromOverview()

Instead of directly accessing ViewSelector and calling these methods
there, cascade the calls to OverviewActor, ControlsManager, and finally
ViewSelector. Also move the opacity transition to OverviewActor.

This commit has no functional change.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1624>

5 years agoviewSelector: Use state adjustment for apps page
Georges Basile Stavracas Neto [Wed, 30 Dec 2020 20:45:09 +0000 (17:45 -0300)]
viewSelector: Use state adjustment for apps page

Currently, ActivitiesContainer reacts to showAppsButton and
transitions between app grid and window picking states on
its own. In the future, we want full control over this.

ControlsManager already has a state adjustment that represents
all possible overview states. Propagate this adjustment up to
ActivitiesContainer, and use it to drive the transition.

This requires moving the callback to the showAppsButton to
ControlsManager, since now it control the state adjustment
itself, not ActivitiesContainer's adjustment.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1624>